#include <stdio.h>

int main()
{
    float a[3][3];
    int i,j;
    float sum = 0.0;
    printf("please input rectangle element:\n");
    for(i = 0;i < 3; i++)
    for(j = 0;j < 3; j++)
    scanf("%f",&a[i][j]);
    for(i = 0;i < 3; i++)
    sum = sum + a[i][i];
    printf("对角线和是：%6.2f\n",sum);
}